package org.test;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
import java.sql.Statement;

import org.dashboard.util.ConsumingService;


public class Main {
	 public static void main(String[] args) throws Exception{
		/*ConnectionFactory db = new ConnectionFactory();
		 Connection conn = db.getConnection();
		  Statement stmt = conn.createStatement();
		  
		  stmt = conn.createStatement();
          ResultSet results = stmt.executeQuery("select * from CONTACTS");
          ResultSetMetaData rsmd = results.getMetaData();
          int numberCols = rsmd.getColumnCount();
          for (int i=1; i<=numberCols; i++)
          {
              //print Column Names
              System.out.print(rsmd.getColumnLabel(i)+"\t\t");  
          }*/
		 ConsumingService dbi = new ConsumingService();
			String[] id = dbi.selectCOORD("ID");
			String[] txt = dbi.selectText("TEXT");
			String[] x = dbi.selectCOORD("COORD_X");
			String[] y = dbi.selectCOORD("COORD_Y");
			for(int i=0;i<x.length;i++){
				System.out.println(id[i]);
				System.out.println(txt[i]);
				System.out.println(x[i]);
				System.out.println(y[i]);
			}
	 }
}
